<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/13
  Time: 23:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page isELIgnored="false" %>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Welcome to Mirco</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="css/signin.css" rel="stylesheet">
</head>

<body class="text-center">
<form class="form-signin" action="${pageContext.request.contextPath}/login">
    <img class="mb-4" src="img/icon.jpg" alt="" width="72" height="72">
    <h1 class="h3 mb-3 font-weight-normal">请登录</h1>
    <label class="sr-only">Username</label>
    <input type="text" class="form-control" name="username" placeholder="用户名" required="required"/>
    <label class="sr-only">Password</label>
    <input type="password" class="form-control" name="password" placeholder="密码" required="required"/>
    <div class="checkbox mb-3">

    </div>
    <button class="btn btn-lg btn-primary " type="submit">登录</button>
    &nbsp;
    &nbsp;
    &nbsp;
    &nbsp;
    &nbsp;
    <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">注册</button>
    <p class="mt-5 mb-3 text-muted">©2021 WHU CS lzx&wzt</p>

</form>

<div class="modal fade text-left" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">注册新用户</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">
                <p>设置账号密码</p>
                <form action="${pageContext.request.contextPath}/addUser">
                    <div class="form-group">
                        <label>账号</label>
                        <input type="text" name="username" placeholder="请填写账号" required="required" class="form-control">
                    </div>
                    <div class="form-group">
                        <label>密码</label>
                        <input type="text" name="password" placeholder="请填写密码" required="required" class="form-control">
                    </div>
                    <div class="form-group">
                        <input type="submit" value="注册" class="btn btn-primary">
                    </div>
                </form>
        </div>
    </div>
</div>

<script src="js/jquery-3.2.1.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>

</div>
</body>
</html>
